1. Field of the Invention
The present invention relates to electrical circuitry, and, in particular, to differential comparators.
2. Description of the Related Art
A differential comparator is an electrical circuit that compares two input voltages and generates an output voltage that indicates the relationship between the two inputs. For example, for a particular differential comparator, when the first input voltage is greater than the second input voltage, the output voltage from the differential comparator will be high. Similarly, when the first input voltage is less than the second input voltage, the output voltage will be low. Thus, the output voltage may be used to indicate which input voltage is greater.
In some applications, it is desirable to compare the two input voltages relative to an offset voltage. For example, an application may need to determine whether or not the first input voltage is greater than the sum of the second input voltage and an offset voltage. An offset voltage is said to be fixed, if its value can be maintained as a constant for one or more comparison operations. Similarly, an offset voltage is said to be controllable, if its value can be selectively changed for different comparison operations.
FIG. 1 shows a schematic diagram of a conventional differential comparator 100 having a fixed and controllable offset voltage. Comparator 100 has a current source X1 whose current ICS1 is mirrored by transistor MCS1 through transistors MCS2 and MCS3 to produce currents ICS2 and ICS3, respectively.
FIG. 2 shows a schematic diagram of current source X1 of FIG. 1. As shown in FIG. 2, a controllable reference voltage VREF is applied to the positive input of an operational amplifier (op-amp) OPCS1. The negative input comes from node FB, which is connected between a reference resistor RCS and the source of an N-channel transistors MFB. The output of the op-amp OPCS1 goes to the gate of transistor MFB. In this manner, the voltage at node FB is forced to be equal to VREF, so that the current through transistor MFB is equal to VREF/RCS (i.e., ICS1 of FIG. 1).
Referring again to FIG. 1, the inputs to differential comparator 100 are applied at nodes P and N, which are in turn applied to the gates of P-channel transistors M1 and M2, respectively. If the current densities through transistors M1 and M2 are kept equal, then the gate-to-source voltages VGS will be equal in M1 and M2. Node P1 will then be at voltage P+VGS1, while node N1 will be at voltage P+VGS2.
Current ICS2 is forced through both resistor RP and transistor M1. The voltage drop De1V across resistor RP is therefore equal to ICS2.times.RP. Since the current ICS2 is equal to the current ICS1 times the transistor-size ratio MCS2/MCS1, the following relation of Equation (1) applies: EQU De1V=ICS1.times.(MCS2/MCS1).times.RP=VREF.times.(MCS2/MCS1).times.(RP/RCS)( 1)
If resistors RIP and RCS are made on a single integrated circuit from the same material (e.g., N-tub, P+ source-drain), then the ratio of RP/RCS is a constant fixed by the geometric layout. Similarly, the ratio MCS2/MCS1 is also fixed by geometry (i.e., the transistor channel widths). Thus, the voltage drop De1V across resistor RP is directly proportional to the reference voltage VREF.
Node N1 is connected to the negative input of comparator X2 and node P2 (which is equal to P1+De1V) is connected to the positive input of comparator X2. Comparator X2 is a low-offset comparator in that it has low or negligible offset (e.g., typically less than 10 mvolts). Such comparators are often referred to in the art as zero-offset comparators. As configured, the difference between the voltage levels at nodes N1 and P2 (i.e., the inputs to comparator X2) is offset by De1V from the difference between the voltage levels at primary inputs N and P. As such, comparator 100 can be described as a differential comparator with a fixed and controllable offset voltage. The offset voltage can be controlled by changing the reference voltage VREF.
Comparator 100 operates adequately for many applications. There are, however, certain applications for which it is desirable to use a differential comparator having fixed and controllable Hysteresis. Comparator 100 is not appropriate for such applications.
Further aspects and advantages of this invention will become apparent from the detailed description which follows.